package com.sc.nft.entity.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@NoArgsConstructor
@Data
public class ImGroupInfoVO {

    @ApiModelProperty(" 返回结果为群组信息数组")
    private List<GroupInfoDTO> groupInfo;

    @NoArgsConstructor
    @Data
    public static class GroupInfoDTO {

        @ApiModelProperty("群组创建时间（UTC 时间）")
        @JSONField(format = "unixtime")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date createTime;

        @ApiModelProperty("最后群资料变更时间（UTC 时间）")
        @JSONField(format = "unixtime")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date lastInfoTime;

        @ApiModelProperty("群组头像")
        private String faceUrl;

        @ApiModelProperty("群组通知")
        private String notification;

        @ApiModelProperty("组id(可以理解为qq群的号码)")
        private String groupId;

        @ApiModelProperty("群组名称")
        private String name;

        @ApiModelProperty("当前在线的成员数")
        private Integer onlineMemberNum;

//        @ApiModelProperty("群组类型")
//        private String type;

        @ApiModelProperty("群组简介")
        private String introduction;

//        @ApiModelProperty("申请加群处理方式")
//        private String applyJoinOption;

        @ApiModelProperty("群内最后一条消息的时间（UTC 时间）")
        @JSONField(format = "unixtime")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date lastMsgTime;

        @ApiModelProperty("群主 ID")
        private String ownerAccount;

        @ApiModelProperty("群全员禁言状态")
        private String muteAllMember;

        @ApiModelProperty("最大群成员数量")
        private Integer maxMemberNum;

        @ApiModelProperty("当前群成员数量")
        private Integer memberNum;

        @ApiModelProperty("错误码")
        @JsonIgnore
        private Integer errorCode;

        @ApiModelProperty("是否在群内")
        private Boolean isExist;

        @ApiModelProperty("排序")
        @JsonIgnore
        private Integer sort;

    }

}
